home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / Xm / XmQTcareParentVisual.z / XmQTcareParentVisual
Text File  |  1998-10-30  |  11KB  |  199 lines

  1.  
  2.  
  3.  
  4.      XXXXmmmmQQQQTTTTccccaaaarrrreeeePPPPaaaarrrreeeennnnttttVVVViiiissssuuuuaaaallll((((3333XXXX))))  UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV  XXXXmmmmQQQQTTTTccccaaaarrrreeeePPPPaaaarrrreeeennnnttttVVVViiiissssuuuuaaaallll((((3333XXXX))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           _X_m_Q_T_c_a_r_e_P_a_r_e_n_t_V_i_s_u_a_l - A child widget holding this trait
  10.           wants to be notified whenever its parent's visual state
  11.           changes
  12.  
  13.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.           #include <Xm/CareVisualT.h>
  15.  
  16.           typedef struct {
  17.                     int                 version;
  18.                     XmCareVisualRedrawProc        redraw;
  19.           } XmCareVisualTraitRec, *XmCareVisualTrait;
  20.           BBBBoooooooolllleeeeaaaannnn ((((****XXXXmmmmCCCCaaaarrrreeeeVVVViiiissssuuuuaaaallllRRRReeeeddddrrrraaaawwwwPPPPrrrroooocccc))))(
  21.           WWWWiiiiddddggggeeeetttt,
  22.           WWWWiiiiddddggggeeeetttt,
  23.           WWWWiiiiddddggggeeeetttt,
  24.           MMMMaaaasssskkkk);
  25.  
  26.      VVVVEEEERRRRSSSSIIIIOOOONNNN
  27.           This page documents Motif 2.1.
  28.  
  29.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  30.           The appearance of many primitive widgets depends on the
  31.           colors and pixmaps of their parents.  For example, Motif
  32.           button widgets use the background color and background
  33.           pixmap of their parents in order to unhighlight themselves.
  34.           Therefore, Motif primitive widgets that depend on their
  35.           parent's appearance need to be alerted whenever their
  36.           parent's appearance changes.  The alerting mechanism is the
  37.           _X_m_Q_T_c_a_r_e_P_a_r_e_n_t_V_i_s_u_a_l trait.  A child widget holding this
  38.           trait wants to be notified whenever there is a change in its
  39.           parent's visual appearance that may affect it.
  40.  
  41.           All Manager widgets must notify their children whenever the
  42.           Manager's visual appearance changes. The sssseeeettttVVVVaaaalllluuuueeeessss method of
  43.           the XXXXmmmmMMMMaaaannnnaaaaggggeeeerrrrwidget takes care of this notification for all
  44.           of its subclasses.  Therefore, if you are writing a subclass
  45.           of Manager, you ordinarily do not have to provide any code
  46.           to notify children of these visual changes.  However,
  47.           Manager does not notify its children of changes to
  48.           SelectColor.  Therefore, if you are writing a subclass of
  49.           Manager that needs to notify its children about changes to
  50.           SelectColor, then your subclass of Manager will need to call
  51.           its children's _r_e_d_r_a_w trait method.
  52.  
  53.           The XXXXmmmmPPPPrrrriiiimmmmiiiittttiiiivvvveeee widget and all its subclasses hold this
  54.           trait.  Therefore, if you are writing a subclass of
  55.           Primitive, the _X_m_Q_T_c_a_r_e_P_a_r_e_n_t_V_i_s_u_a_l trait will automatically
  56.           be installed on it.
  57.  
  58.         TTTThhhheeee rrrreeeeddddrrrraaaawwww TTTTrrrraaaaiiiitttt MMMMeeeetttthhhhoooodddd
  59.           BBBBoooooooolllleeeeaaaannnn rrrreeeeddddrrrraaaawwww(
  60.  
  61.  
  62.  
  63.      Page 1                                         (printed 10/24/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXmmmmQQQQTTTTccccaaaarrrreeeePPPPaaaarrrreeeennnnttttVVVViiiissssuuuuaaaallll((((3333XXXX))))  UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV  XXXXmmmmQQQQTTTTccccaaaarrrreeeePPPPaaaarrrreeeennnnttttVVVViiiissssuuuuaaaallll((((3333XXXX))))
  71.  
  72.  
  73.  
  74.           WWWWiiiiddddggggeeeetttt cccchhhhiiiillllddddWWWWiiiiddddggggeeeetttt,
  75.           WWWWiiiiddddggggeeeetttt ccccuuuurrrrrrrreeeennnnttttPPPPaaaarrrreeeennnnttttWWWWiiiiddddggggeeeetttt,
  76.           WWWWiiiiddddggggeeeetttt nnnneeeewwwwPPPPaaaarrrreeeennnnttttWWWWiiiiddddggggeeeetttt,
  77.           MMMMaaaasssskkkk vvvviiiissssuuuuaaaallllCCCChhhhaaaannnnggggeeeeMMMMaaaasssskkkk);
  78.  
  79.           The _r_e_d_r_a_w trait method of XXXXmmmmPPPPrrrriiiimmmmiiiittttiiiivvvveeee examines the
  80.           _v_i_s_u_a_l_C_h_a_n_g_e_M_a_s_k argument to see what has changed in the
  81.           visual appearance of its parent. If the parent's background
  82.           pixmap or background color has changed, then the _r_e_d_r_a_wtrait
  83.           method invokes the pppprrrriiiimmmmiiiittttiiiivvvveeee....bbbboooorrrrddddeeeerrrr____uuuunnnnhhhhiiiigggghhhhlllliiiigggghhhhttttmethod (if
  84.           unhighlighting is necessary).
  85.  
  86.           If you are writing a primitive widget, you do not have to
  87.           provide a _r_e_d_r_a_w trait method _u_n_l_e_s_s your primitive widget
  88.           depends on its parent's appearance in a non-default way.  In
  89.           this case, your _r_e_d_r_a_w trait method should probably envelop
  90.           the _r_e_d_r_a_w trait method of XXXXmmmmPPPPrrrriiiimmmmiiiittttiiiivvvveeee.
  91.  
  92.           _c_h_i_l_d_W_i_d_g_e_t
  93.                     Specifies the child widget that is affected by
  94.                     visual changes in its parent.
  95.  
  96.           _c_u_r_r_e_n_t_P_a_r_e_n_t_W_i_d_g_e_t
  97.                     Specifies the current parent widget.
  98.  
  99.           _n_e_w_P_a_r_e_n_t_W_i_d_g_e_t
  100.                     Specifies the new parent widget.
  101.  
  102.           _v_i_s_u_a_l_C_h_a_n_g_e_M_a_s_k
  103.                     Specifies a bit mask. Each bit in the mask
  104.                     represents a different visual attribute of the
  105.                     parent. If the bit is set, then that visual
  106.                     attribute has changed. The bit mask may consist of
  107.                     any combination of the following constants:
  108.  
  109.                     VVVViiiissssuuuuaaaallllFFFFoooorrrreeeeggggrrrroooouuuunnnndddd
  110.                               Specifies a visual change in the
  111.                               parent's foreground color.
  112.  
  113.                     VVVViiiissssuuuuaaaallllHHHHiiiigggghhhhlllliiiigggghhhhttttPPPPiiiixxxxmmmmaaaapppp
  114.                               Specifies a visual change in the
  115.                               parent's highlight pixmap.
  116.  
  117.                     VVVViiiissssuuuuaaaallllHHHHiiiigggghhhhlllliiiigggghhhhttttCCCCoooolllloooorrrr
  118.                               Specifies a visual change in the
  119.                               parent's highlight color.
  120.  
  121.                     VVVViiiissssuuuuaaaallllBBBBoooottttttttoooommmmSSSShhhhaaaaddddoooowwwwPPPPiiiixxxxmmmmaaaapppp
  122.                               Specifies a visual change in the
  123.                               parent's bottom shadow pixmap.
  124.  
  125.                     VVVViiiissssuuuuaaaallllBBBBoooottttttttoooommmmSSSShhhhaaaaddddoooowwwwCCCCoooolllloooorrrr
  126.  
  127.  
  128.  
  129.      Page 2                                         (printed 10/24/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXmmmmQQQQTTTTccccaaaarrrreeeePPPPaaaarrrreeeennnnttttVVVViiiissssuuuuaaaallll((((3333XXXX))))  UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV  XXXXmmmmQQQQTTTTccccaaaarrrreeeePPPPaaaarrrreeeennnnttttVVVViiiissssuuuuaaaallll((((3333XXXX))))
  137.  
  138.  
  139.  
  140.                               Specifies a visual change in the
  141.                               parent's bottom shadow color.
  142.  
  143.                     VVVViiiissssuuuuaaaallllSSSSeeeelllleeeeccccttttCCCCoooolllloooorrrr
  144.                               Specifies a visual change in the
  145.                               parent's select color. (This is the only
  146.                               visual change that XXXXmmmmMMMMaaaannnnaaaaggggeeeerrrr does not
  147.                               process.)
  148.  
  149.                     VVVViiiissssuuuuaaaallllTTTTooooppppSSSShhhhaaaaddddoooowwwwPPPPiiiixxxxmmmmaaaapppp
  150.                               Specifies a visual change in the
  151.                               parent's top shadow pixmap.
  152.  
  153.                     VVVViiiissssuuuuaaaallllTTTTooooppppSSSShhhhaaaaddddoooowwwwCCCCoooolllloooorrrr
  154.                               Specifies a visual change in the
  155.                               parent's top shadow color.
  156.  
  157.                     VVVViiiissssuuuuaaaallllBBBBaaaacccckkkkggggrrrroooouuuunnnnddddPPPPiiiixxxxeeeellll
  158.                               Specifies a visual change in the
  159.                               parent's background color.
  160.  
  161.                     VVVViiiissssuuuuaaaallllBBBBaaaacccckkkkggggrrrroooouuuunnnnddddPPPPiiiixxxxmmmmaaaapppp
  162.                               Specifies a visual change in the
  163.                               parent's background pixmap.
  164.  
  165.                     The NNNNooooVVVViiiissssuuuuaaaallllCCCChhhhaaaannnnggggeeee constant symbolizes that
  166.                     nothing has changed.
  167.  
  168.           This method returns a Boolean value. A returned value of
  169.           _T_r_u_e means that the child needs to be redrawn. A returned
  170.           value of _F_a_l_s_e means that the child does not need to be
  171.           redrawn.
  172.  
  173.      RRRREEEELLLLAAAATTTTEEEEDDDD
  174.           XXXXmmmmMMMMaaaannnnaaaaggggeeeerrrr(3) and XXXXmmmmPPPPrrrriiiimmmmiiiittttiiiivvvveeee(3).
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                                         (printed 10/24/98)
  196.  
  197.  
  198.  
  199.